package router

import (
	"github.com/gin-gonic/gin"
	"travel-buddy/handler"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.POST("add", handler.Add)
	r.GET("list", handler.List)
	r.GET("detail", handler.Detail)
	// 2.绑定路由规则，执行的函数
	return r
}
